<template>
  <div>
    <el-tabs v-model="activeName" type="border-card" @tab-click="tabClick">
      <el-tab-pane label="项目信息" name="project" ref="project">
        <project @contractInfo="contractInfo"></project>
      </el-tab-pane>
      <el-tab-pane label="合同信息" name="contract" :disabled="pid!==''?false:true">
        <contract ref="contract" :pid="pid" @itInfo=itInfo></contract>
      </el-tab-pane>
      <el-tab-pane label="IT资产和购买服务" name="it" :disabled="cid!==''?false:true">
        <it ref="it" :cid="cid"></it>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import project from './project.vue'
import contract from './contract.vue'
import it from './it.vue'
export default {
  name: 'PastDeclaredVerify',
  components: {
    project, contract, it
  },
  props: {

  },
  data () {
    return {
      activeName: 'project',
      pid: '',
      cid: '',
    }
  },
  created () {

  },
  mounted () {
    this.init()
  },
  methods: {
    init () {

    },
    tabClick (name) {

    },
    contractInfo (id) {
      this.pid = id
      setTimeout(() => {
        this.activeName = 'contract'
        this.$refs.contract.init()
      }, 500);
    },
    itInfo (id) {
      this.cid = id
      setTimeout(() => {
        this.activeName = 'it'
        this.$refs.it.init()
      }, 500);
    }
  },
  computed: {

  }
}
</script>
<style lang='scss' scoped>
</style>
